#include <gtest/gtest.h>

#include <Store/UploadsTable.h>

#include "CRUDTest.h"
#include "Database.h"
#include <QUuid>
#include <time.h>

using namespace TCServer;
using namespace TCServer::Store;

TEST(Store_Uploads, insert_delete)
{
    Database();
    typedef TCServer::Store::UploadsTable TableType;

    auto path = "_testPath";
    TableType::insert(path);
    TableType::remove(path);
}

//TEST(Store_Uploads, DISABLED_insertAll)
//{
//    Database();
//    qsrand(time(nullptr));
//    typedef TCServer::Store::UploadsTable TableType;
//    for (int i = 0; i < 10000 ; i++)
//    {
//        auto path = QString("testInsert_%1_%2")
//            .arg(qrand())
//            .arg(QUuid::createUuid().toString());
//        TableType::insert(path);
//    }
//}